public class Employee2 {
    private int age;


    public void setAge(int age) {
        if (22 <= age && age <= 65){
            this.age = age;
        }else{
            throw new AgeException("异常信息：年龄应在22~65之间");
        }

    }
}
